package com.example.spidertp.core.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.example.spidertp.common.ResponseEntity;
import com.example.spidertp.core.model.entity.TpWarningNotice;
import com.example.spidertp.core.model.param.WarningNoticeQueryParam;
import com.example.spidertp.core.service.TpWarningNoticeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author xiong.bo
 * @version 1.0
 * @date 2023/8/27 11:14 上午
 */

@Api(tags = "线程池运行报警记录管理控制器")
@RequestMapping("/api/warning-notice")
@RestController
public class WarningNoticeController {

    @Autowired
    private TpWarningNoticeService warningNoticeService;

    @ApiOperation("获取线程池运行报警记录")
    @GetMapping
    public ResponseEntity<IPage<TpWarningNotice>> selectByPage(WarningNoticeQueryParam param){
        return ResponseEntity.ok(warningNoticeService.selectByPage(param));
    }

}
